package cn.com.surker.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
 * <p>
 * 材料类型表
 * </p>
 *
 * @author admin
 * @since 2024-06-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MainMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 材料类型ID
     */
    private Long materialId;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 编码
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    /**
     * 规格
     */
    private String norms;
    /**
     * 厂家
     */
    private String brand;

    /**
     * 材料大类分类枚举
     */
    private Integer type;

    /**
     * 过磅显示(0:显示，1：隐藏)
     */
    private Integer isDisplay;

    /**
     * 规格全称
     */
    private String nameNorms;

    /**
     * 上级ID(根ID为-1)
     */
    private Long parentId;

    /**
     * 仓位类型(0:无1:筒仓2:堆场)
     */
    private Integer storeType;

    /**
     * 结算类型(0:按过磅重量结算，1：按供方重量计算)
     */
    private Integer billWeightType;

    /**
     * 工控分类
     */
    private Integer breedType;

    /**
     * 状态(0:启用1：禁用)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人
     */
    private String creator;

    /**
     * erpid材料ID
     */
    private Integer erpid;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 修改人
     */
    private String updator;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
    public MainMaterial(){}
    public MainMaterial(Long materialId, Long orgId, String code, String name, String norms, String nameNorms,
                        Long parentId, Integer storeType, Integer status, String remark, String creator,
                        Integer erpid, Date createTime) {
        this.materialId = materialId;
        this.orgId = orgId;
        this.code = code;
        this.name = name;
        this.norms = norms;
        this.nameNorms = nameNorms;
        this.parentId = parentId;
        this.storeType = storeType;
        this.status = status;
        this.remark = remark;
        this.creator = creator;
        this.erpid = erpid;
        this.createTime = createTime;
    }
}
